package com.aichongbang.acb.service.impl;

import com.aichongbang.acb.po.ServiceManage;
import com.aichongbang.acb.mapper.ServiceManageMapper;
import com.aichongbang.acb.service.IServiceManageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author acb
 * @since 2021-05-27
 */
@Service("serviceManageService")
public class ServiceManageServiceImpl extends ServiceImpl<ServiceManageMapper, ServiceManage> implements IServiceManageService {

    @Resource
    private ServiceManageMapper serviceManageMapper;

    @Override
    public List<ServiceManage> getAllServiceManage() {
        List<ServiceManage> list = serviceManageMapper.getAllServiceManage();
        return list;
    }

    @Override
    public List<ServiceManage> queryServiceManage(ServiceManage serviceManage) {
        List<ServiceManage> list = serviceManageMapper.queryServiceManage(serviceManage);
        return list;
    }

    @Override
    public boolean updateServiceManage(ServiceManage serviceManage) {
        int n = serviceManageMapper.updateById(serviceManage);
        return n > 0 ? true :false;
    }

    @Override
    public boolean deletedServiceManage(Integer tId) {
        int n = serviceManageMapper.deleteById(tId);
        return n > 0 ? true :false;
    }
}
